/*
* Copyright (c) 2010 Michael Collins
*
* This file is part of TerraFirma.
*
* TerraFirma is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* TerraFirma is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with TerraFirma.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENTITY_H
#define ENTITY_H

#include <stdint.h>
#include <vector.hpp>

namespace game
{
    //Entity types
    enum {
        ENTITY,
        PHYSICS,
        VEHICLE,
        WEAPON,
        HUD
    };

    class Entity
    {
    public:
        Entity();
        Entity(uint32_t id);
        Entity(const fixedpoint::vec2d& p, const fixedpoint::vec2d& d, const char* n);
        virtual ~Entity();

        //Simple runtime type-checking mechanics
        virtual bool is_physics_ent() const {return false;}
        virtual bool is_vehicle_ent() const {return false;}
        virtual bool is_weapon_ent() const {return false;}
        virtual bool is_hud_ent() const {return false;}
        virtual uint32_t type() const {return ENTITY;}

        uint32_t id;

        fixedpoint::vec2d pos, dir;

        bool alive;

        const char* name; //this references a name defined in lua

    protected:
    private:
    };

}

#endif // ENTITY_H
